package com.hmy.pig.service.impl;

import com.hmy.pig.domain.HmyPigTransfer;
import com.hmy.pig.mapper.PigMapper;
import com.hmy.pig.mapper.PigTransferMapper;
import com.hmy.pig.service.PigTransferService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author zhl
 * @descript 描述
 * @date 2024/2/18 11:46
 */
@Service
public class PigTransferServiceImpl implements PigTransferService {

    @Resource
    private PigTransferMapper pigTransferMapper;


    @Override
    public List<HmyPigTransfer> selectPigTransfer(String pigCode,
                                                  String transferOutPhouseType,
                                                  String transferIntoPhouseType,
                                                  String transferDateStart,
                                                  String transferDateEnd) {
        return pigTransferMapper.selectPigTransfer(pigCode, transferOutPhouseType, transferIntoPhouseType, transferDateStart, transferDateEnd);
    }

    @Override
    public int insertPigTransfer(HmyPigTransfer hmyPigTransfer) {

        int rows = pigTransferMapper.insertPigTransfer(hmyPigTransfer);
        return rows;
    }

    @Override
    public HmyPigTransfer selectPigTransferByTransferId(Long transferId) {
        return pigTransferMapper.selectPigTransferByTransferId(transferId);
    }

    @Override
    public int updatePigTransfer(HmyPigTransfer hmyPigTransfer) {

        return pigTransferMapper.updatePigTransfer(hmyPigTransfer);
    }

    @Override
    public int deletePigTransferByTransferId(Long transferId) {
        return pigTransferMapper.deletePigTransferByTransferId(transferId);
    }

    @Override
    public int deletePigTransferByTransferIds(Long[] transferIds) {
        return pigTransferMapper.deletePigTransferByTransferIds(transferIds);
    }
}
